package com.ityy.ruiji.dao;


import com.ityy.ruiji.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;

public interface UserDao {


    @Select("select * from user where phone =#{phone}")
    User findByPhone(String phone);

    @Insert("insert into user(phone,status) values (#{phone},#{status})")
    @Options(useGeneratedKeys = true,keyProperty = "id",keyColumn = "id")
    void insert(User user);

    @Select("select * from user where id=#{userId}")
    User selectById(Long userId);
}
